package cc.ttiot.service.dataCollection.io;

import com.pi4j.io.gpio.*;

/**
 * @Description: io数据采集通用接口, io口采用WPI编号形式
 * @Author WangSuheng
 * @Date 2021/10/1 2:36
 * @Version 1.0
 */

public interface IoCollection {
    // 获取 GPIO Controller对象(静态方法)
    GpioController GPIO = GpioFactory.getInstance();

    //将GPIO引脚#04作为接近开关输入引脚
    Pin APPROACHING_SWITCH_PIN = RaspiPin.GPIO_04;

    //将GPIO引脚#05作为DHT11串口引脚(读取温湿度)
    Pin DHT22_PIN = RaspiPin.GPIO_05;

    //获取io口状态(PinState.HIGH或者PinState.LOW)
    PinState getState();

}
